from sqlalchemy import (
    Column,
    Index,
    Integer,
    Text,
    Unicode,
    ForeignKey,
    Table,
    Float,
    DateTime
)


from sqlalchemy.orm import relationship

from .meta import Base

class Comment(Base):
    __tablename__='comments'
    id=Column(Integer,primary_key=True)
    user_id=Column(Integer,ForeignKey('users.id'),nullable=True)
    user=relationship("User",backref='comments')
    item_id = Column(Integer, ForeignKey('items.id'), nullable=True)
    item = relationship("Item", backref='comments')
    rank=Column(Integer)
    content=Column(Text)